package main.java.day02;
/**
 * 将字符串"123abc456def789ghi"中的英文部分替换为"#char#"
 * @author Xiloer
 *
 */
public class Test04 {
    public static void main(String[] args) {
//        String string="123abc456def789ghi";
//        String a="(abc|def|ghi)+";
//        string=string.replaceAll(a,"#char#");
//        System.out.println(string);
        String string="123abc456def789ghi";
        string=string.replace("abc","#char#");
        string=string.replace("def","#char#");
        string=string.replace("ghi","#char#");
        System.out.println(string);
    }

}
